package com.zhuchaooasystem.utils;

import android.content.Context;
import android.content.SharedPreferences;

/**
 * @author yinsi
 */

public class SharedprefrenceUtils {

    public static void setUsername(Context context, String username) {
        SharedPreferences sharedPreferences = context.getSharedPreferences("USER", Context.MODE_PRIVATE);
        SharedPreferences.Editor editer = sharedPreferences.edit();
        editer.putString("username", username);
        editer.commit();
    }

    public static String getUsername(Context context) {
        SharedPreferences sharedPreferences = context.getSharedPreferences("USER", Context.MODE_PRIVATE);
        return sharedPreferences.getString("username", "");
    }
}
